Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My improvements:
Now the
baseSrc
parameter allows entering an array. This way, you could add angular multi-project projects, just by setting all the directories of the different projects:Added an
alreadyVerified
option to avoid the reporting of zombie keys that have been already verified and are correct. This is an attempt to mitigate the problems found with dynamic keys: if you mark certain keys as "verified", those will not be reported as zombies anymore.List of zombie keys can be exported, too (see below). This way, when you want just to check your precious translate file and check, line by line, the translations found and remove manually those that are zombies, you can make that too, just asking
the function to write down the list of zombie keys it have found:
Function
walkThroughAllFiles
is not that complicated, in my humble opinion. Check out the new version.Other functions have been changed name:
findInFile
in fact, does not just "find in a file" the zombie keys, but remove the found keys, so it's changed toremoveKeyIfFoundInFile
.Libraries under
package.json
have been upgraded. I've done my best to preserve functionality of the existing scripts, butI failed in some cases due to errors in libraries (trash).